import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './registerServiceWorker'

Vue.config.productionTip = false

import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'

Vue.use(MintUI);

// import axios from 'axios'
// axios.defaults.baseURL = 'http://lovegf.cn:8899';
// Vue.use(axios);

import  "./lib/mui/css/mui.css"
import  "./lib/mui/css/icons-extra.css"

// 图片缩略图
import VuePreview from 'vue-preview'
Vue.use(VuePreview)

/* 全局过滤器 */
// Vue.filter("format", function (datastr, pattern) {
//   var dt = new Date(datastr);
//   var y = dt.getFullYear();
//   var m = dt.getMonth();
//   var d = dt.getDate();
//   if (pattern && pattern.toLowerCase() === "yy-mm-dd") {
//       return `${y}-${m}-${d}`;
//   } else {
//       var hh = dt.getHours();
//       var mm = dt.getMinutes();
//       var ss = dt.getSeconds();
//       return `${y}-${m}-${d}  ${hh}:${mm}:${ss}`;
//   }
// });
import  moment  from  "moment";
Vue.filter("format", function (datastr, pattern) {
  return moment(datastr).format("YYYY-MM-DD  HH:mm:ss");
});

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
